<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <title>注册</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link rel="stylesheet" type="text/css" href="./public/css/user.css"></link>
        <script type="text/javascript" src="./public/js/jquery-3.1.1.min.js"></script>

    </head>
    <body>
        <a href="index.php?m=index&c=user&a=index">登录</a>
        <div id="background">
            <div class="text">
                <span class="text_name">用户</span>
                <input type="text" name="name" id="name"/>
                <span class="text_msg" id="name_msg">首位为字母</span>   
            </div>
            <div class="text">
                <span class="text_name">密码</span>
                <input type="password" name="pwd" id="pwd"/>
                <span class="text_msg" id="pwd_msg">用户名长度为5-15位</span>   
            </div>
              <div class="text">
                <span class="text_name">昵称</span>
                <input type="text" name="nick_name" id="nick_name"/>
                <span class="text_msg" id="nick_name_msg">用户名长度为1-6位</span>   
            </div>
            <div class="text">
                <span class="text_name">邮箱</span>
                <input type="text" name="email" id="email"/>
                <span class="text_msg" id="email_msg">请按格式填写</span>   
            </div>
            <div class="text">
                <span class="text_name">手机</span>
                <input type="text" name="tel" id="tel"/>
                <span class="text_msg" id="tel_msg">大陆手机号</span>  
                <br/>
                <a href="javascript:;" class="button">注册</a>
            </div>
        </div>
    </body>
</html>
<script type="text/javascript" src="./public/js/register.js"> 
//    {literal}
//            $(".button").click(function(){
//                var name = $(".name").val();
//                var pwd = $(".pwd").val();
//                var nick_name = $(".nick_name").val();
//                var email = $(".email").val();
//                var tel = $(".tel").val();
//                $.ajax({
//                    type:"get",
//                    url:"./index.php?m=index&v=userController&c=addUser",
//                    data:{name:name,pwd:pwd,nick_name:nick_name,email:email,tel:tel},
//                    success:function(a){
//                       if(a == 1) {
//                                   alert("添加成功");
//                                   window.location.href="../index.php";
//                               }else{
//                                  alert("添加失败");   
//                    }
//                    
//                })           
//            }
//    {/literal}
 
</script>